source('dados.R')

my.bootstrap <- function(X)
{
	m = 1000
	us <- NULL
	for(t in 1:m) {
		N <- length(X)
		is <- runif(N, 1, N)
		xs <- X[is]
		us[t] <- mean(xs)
	}
	E <- sd(us)/sqrt(N)

	zcritical <- 1.645  # para alpha=0.95
	x0 <- mean(X) - zcritical*E
	x1 <- mean(X) + zcritical*E
	print(paste('[', round(x0,4), ',', round(x1,4), ']'))
}

